﻿using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using System.Reflection;
using log4net;

namespace AnyOffice.general.ipanel
{
    public partial class smsbox_delete : BasePage
    {
        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);      

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                int smsId = (Request.QueryString["sms_id"] != null) ? int.Parse(Request.QueryString["sms_id"].ToString()) : 0;
                new SmsDao().Delete(base.Conn, smsId, base.User.Identity.Name);
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
            base.CloseConn();
            Response.Redirect("smsbox.aspx");
        } 

    }
}
